package br.com.ac.fatureweb.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import br.com.ac.fatureweb.enums.EnumStatusCarga;
import br.com.ac.fatureweb.utilitary.Model;

@Entity
@Table(name = "CARGA")
@SequenceGenerator(name = "SEQ_CARGA", sequenceName = "SEQ_CARGA", allocationSize = 1, initialValue = 1)
public class Carga extends Model {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7046931227538692883L;

	@Id
	@GeneratedValue(generator = "SEQ_CARGA", strategy = GenerationType.SEQUENCE)
	@Column(name = "ID")
	private Long id;

	@Column(name = "COMPETENCIA")
	private Long competencia;

	@Column(name = "DATA_CARGA")
	@Temporal(TemporalType.TIMESTAMP)
	private Date dataCarga;

	@Column(name = "QTD_IMOVEL")
	private Integer qtdImovel;

	@Column(name = "QTD_LANCAMENTO_FUTURO")
	private Integer qtdLancamentoFuturo;

	@Column(name = "STATUS")
	@Enumerated(EnumType.ORDINAL)
	private EnumStatusCarga enumStatusCarga;

	public Carga() {
		super();
	}

	public Carga(Long id, Long competencia, Date dataCarga, Integer qtdImovel,
			Integer qtdLancamentoFuturo) {
		super();
		this.id = id;
		this.competencia = competencia;
		this.dataCarga = dataCarga;
		this.qtdImovel = qtdImovel;
		this.qtdLancamentoFuturo = qtdLancamentoFuturo;
	}

	public Carga(Long id) {
		super();
		this.id = id;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the competencia
	 */
	public Long getCompetencia() {
		return competencia;
	}

	/**
	 * @param competencia
	 *            the competencia to set
	 */
	public void setCompetencia(Long competencia) {
		this.competencia = competencia;
	}

	/**
	 * @return the dataCarga
	 */
	public Date getDataCarga() {
		return dataCarga;
	}

	/**
	 * @param dataCarga
	 *            the dataCarga to set
	 */
	public void setDataCarga(Date dataCarga) {
		this.dataCarga = dataCarga;
	}

	/**
	 * @return the qtdImovel
	 */
	public Integer getQtdImovel() {
		return qtdImovel;
	}

	/**
	 * @param qtdImovel
	 *            the qtdImovel to set
	 */
	public void setQtdImovel(Integer qtdImovel) {
		this.qtdImovel = qtdImovel;
	}

	/**
	 * @return the qtdLancamentoFuturo
	 */
	public Integer getQtdLancamentoFuturo() {
		return qtdLancamentoFuturo;
	}

	/**
	 * @param qtdLancamentoFuturo
	 *            the qtdLancamentoFuturo to set
	 */
	public void setQtdLancamentoFuturo(Integer qtdLancamentoFuturo) {
		this.qtdLancamentoFuturo = qtdLancamentoFuturo;
	}

	/**
	 * @return the enumStatusCarga
	 */
	public EnumStatusCarga getEnumStatusCarga() {
		return enumStatusCarga;
	}

	/**
	 * @param enumStatusCarga
	 *            the enumStatusCarga to set
	 */
	public void setEnumStatusCarga(EnumStatusCarga enumStatusCarga) {
		this.enumStatusCarga = enumStatusCarga;
	}

}
